//
//  NSTimer+Extension.m
//  XiaoMiao
//
//  Created by 23 on 2017/12/4.
//  Copyright © 2017年 smallyou. All rights reserved.
//

#import "NSTimer+Extension.h"

@implementation NSTimer (Extension)

+(NSTimer *)kscheduledTimerWithTimeInterval:(NSTimeInterval)interval block:(void (^)())block repeats:(BOOL)repeats
{
    return [self scheduledTimerWithTimeInterval:interval target:self selector:@selector(clblockInvoke:)userInfo:[block copy]repeats:repeats];
}

+(void)clblockInvoke:(NSTimer*)timer
{
    void(^block)()= timer.userInfo;
    if (block) {
        block();
    }
}

@end
